#ifndef _SDLVIDEOVIEWER_H
#define	_SDLVIDEOVIEWER_H

#include <X11/Xlib.h>
#include <SDL/SDL.h>

#include "../videoviewer.h"
#include "sdlwidget.h"

class SDLVideoViewer : public VideoViewer, public SDLWidget {
public:
    void Boot(string URL);
    virtual ~SDLVideoViewer();
    void SetSize(int width, int height);
    void SetPosition(int x, int y);
    void Render();
private:
    int m_x, m_y, m_width, m_height;
    Window m_window;
    SDL_SysWMinfo m_syswminfo;
    
    
    bool CreateX11SubWindow(Display *dpy, Window parent,
            int x, int y, int width, int height);
    void SetWindowLink(int x, int y, int width, int height);
};

#endif	/* _SDLVIDEOVIEWER_H */ 
